#include <iostream>
#include <vector>
#include <string>

using namespace std;

int hammingDistance(int x, int y) {
    int d = 0;
    while(x != 0 || y != 0){
        int i = x & 1, j = y & 1;
        if(i ^ j) d++;
        x >>= 1, y >>= 1;
    }
    return d;
}

int main(){
    int x = 1, y = 4;
    cout << hammingDistance(x, y) << endl;
    return 0;
}
